package com.usernet.product.utils;

import javax.servlet.http.HttpServletRequest;

public class ProductConfig {

	public static final String CHARSET = "UTF-8"; // 项目统一编码

	public static String realPath = null; // 真实物理地址

	public static final int DIS_STATUS = 1; // 所有不可用状态

	public static final int FLAG_SOFT = 1; // flag=1为软件
	public static final int FLAG_GAME = 2; // flag=2为游戏
	public static final int FLAG_RES = 3; // flag=3为专题

	public static final int PAGE_SIZE_FOR_LIST = 10; // 全局列表分页大小
	public static final int PAGE_SIZE_FOR_COMMONT = 10; // 全局列表分页大小

	public static String MD5_CODE = "apktv"; // MD5较密代码

	public static int cacheTime = 10000; // 缓存时间

	public static String basePath = null;
	public static String downPath = null;

	public static void setRealPath(HttpServletRequest request) {
		realPath = request.getSession().getServletContext().getRealPath("/");
	}

	public static final String VERSION = "1.0.0";// 项目版本号

	public static final int RELEASE = 20101001; // 项目发布日期

	public static final int DEFAULT_RECOMMEND = 100000;// 默认推荐顺序都为100000
	public static final int DEFAULT_AVG = 0;// 默认评分0
	public static final int DEFAULT_DOWN_COUNT = 0;// 默认下载次数0
	public static final int MAX_LOGIN_ERROR_COUNT = 5;// 登录最大错误5次
	
	public static final int LOGIN_FLAG_MANAGE = 1; // 管理后台登录
	public static final int LOGIN_FLAG_WEB = 2; // 网站登录
	public static final int LOGIN_FLAG_MOBILE = 3; // 手机端登录
	
	public static String downloadPath = null; // 下载地址

}
